package birdsVSZombiesClient.GUI;

import ddf.minim.Minim;
import processing.core.PApplet;
import processing.core.PFont;
import processing.core.PImage;

/**
 * The button class for the GUI of the game.
 * @author Yang Liu
 * @version Version 0.0.4
 */
public class BVZButton{
	
	public static PApplet parent;
	
	public static Minim btMinim;
	
	public int buttonX;
	public int buttonY;
	public int baseColor, highlightColor;
	public int currentColor;
	public boolean over = false;
	public boolean pressed = false;
	
	public PFont buttonFont;
	public String buttonText;
	public int fontSize = 20;
	
	public PImage buttonImage;
	public PImage buttonHoverImage;
	public PImage currentImage;
	
	public void update(){
		if(over()){
			currentColor = highlightColor;
			currentImage = buttonHoverImage;
		}
		else{
			currentColor = baseColor;
			currentImage = buttonImage;
		}
	}
	
	public boolean pressed(){
		if(over){
			return true;
		}
		else{
			return false;
		}
	}
	
	public boolean over(){
		return true;
	}
	
	public boolean overRect(int x, int y, int width, int height){
		if(parent.mouseX >= x && parent.mouseX <= x+width &&
				parent.mouseY >= y && parent.mouseY <= y+height){
			return true;
		}
		else{
			return false;
		}
	}
}








